package com.yqd.lesson.actor.six

import akka.actor.{Actor, ActorLogging, Props}
import akka.dispatch.{BoundedMessageQueueSemantics, RequiresMessageQueue}

object Sender {
  //def props: Props = Props[Sender].withDispatcher("my-pinned-dispatcher")
  def props: Props = Props[Sender]
}

class Sender extends Actor with ActorLogging {
  import Sender._

  def receive = {
    case msg:String =>
      Thread.sleep(1000 * 5)
      log.info(s"${sender().path} say: $msg")
  }
}
